@svizzle/utils/string-[string-string]

Methods

(static) makePostfixed(postfix) → {function}

Source:
Since:
  • 0.12.0
See:

Return a function that appends the provided string to the input string

Example
> postfixed = makePostfixed('---')
> postfixed('A')
'A---'
> postfixed('B')
'B---'
Parameters:
Name Type Description
postfix string

The string to be appended

Returns:
  • String -> String
Type
function

(static) makePrefixed(prefix) → {function}

Source:
Since:
  • 0.1.0
See:

Return a function that prepends the provided string to the input string

Example
> prefixed = makePrefixed('---')
> prefixed('A')
'---A'
> prefixed('B')
'---B'
Parameters:
Name Type Description
prefix string

The string to be prepended

Returns:
  • String -> String
Type
function